package com.example.demo.controller;

import com.example.demo.dto.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWord {

    @Autowired
    Person person;

    @GetMapping("hello")
    public String TestHello(){
        return "Hello World";
    }

    /**
     * 测试yml文件中赋值
     * @return
     */
    @GetMapping("test1")
    public Person test1(){
        return person;
    }
}
